﻿<Window x:Class="NikonGuyPhotoDesktop.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="NikonGuyPhotoDesktop" Height="400" Width="600"
    x:Name="_Window1"
    >
  <DockPanel>
    <ProgressBar DockPanel.Dock="Bottom" xmlns:doGrid.Row="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 x:Name="_ProgressBar" Minimum="0" Height="15" />
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="300"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>

      <Grid Grid.Column="0" DataContext="{Binding ElementName=_Window1, Path=ImageList}" Margin="2">
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0" Orientation="Vertical">
          <Button x:Name="_AddImagesButton">add images</Button>
          <Slider x:Name="_ImageScaleSlider" Minimum="0.10" Maximum="2.0" Value="1.0"/>
          <Button x:Name="_ClearSelectedButton">clear selected</Button>
          <Button x:Name="_ClearListButton">clear list</Button>
          <StackPanel Orientation="Horizontal">
            <TextBlock Text="width"/>
            <TextBox x:Name="_BackgroundWidth" Text="640"/>
          </StackPanel>
          <StackPanel Orientation="Horizontal">
            <TextBlock Text="height"/>
            <TextBox x:Name="_BackgroundHeight" Text="480"/>
          </StackPanel>
          <StackPanel Orientation="Horizontal">
            <TextBlock Text="largest image"/>
            <TextBox x:Name="_LargestImage" Text="100"/>
          </StackPanel>
          <Button x:Name="_SaveBackgroundButton">save background</Button>
          <Button x:Name="_GenerateBackgroundButton">generate background</Button>
        </StackPanel>
        <ListBox Grid.Row="1" x:Name="_ImageListBox" xmlns:ItemsSource="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
                 ItemsSource="{Binding}" SelectionMode="Multiple" Margin="2">

        </ListBox>
      </Grid>

      <!--<ScrollViewer >
      </ScrollViewer>-->
      <Image x:Name="_DesktopImageControl" Grid.Column="1" Margin="2">
        <Image.LayoutTransform>
          <ScaleTransform ScaleX="{Binding ElementName=_ImageScaleSlider, Path=Value}" 
                          ScaleY="{Binding ElementName=_ImageScaleSlider, Path=Value}"/>
        </Image.LayoutTransform>
      </Image>


    </Grid>
  </DockPanel>
</Window>
